#include <string.h>
#include <iostream>
using namespace std;
int main(){
string s;
char c;
cout<<" :";
string Zagl_rus="";
string Engl_abc="qwertyuiopasdfghjklzxcvbnm";
cout<<Zagl_rus.find("Q")<<endl;
cin>>s;
getline(cin,s);
s=s+' ';
int len=s.length();
int k=0;
for(int i=0;i<len-1;i++)
if (s[i]!=' ' && s[i+1]==' ')
k++;
if (k<=1){
cout<<" "<<endl;}
else{
cout<<"- :"<<k<<endl;
int flag=0;
k=0;
for(int i=0;i<len-1;i++){
if (s[i]!=' ' && flag==0){
if ( Zagl_rus.find(s[i])!=string::npos )
k++;
flag=1;}
if (s[i]==' ')
flag=0;}
cout<<"- :"<<k<<endl;
k=0;
flag=0;
for(int i=0;i<len;i++){
if (s[i]!=' ') {
if (Engl_abc.find(tolower(s[i])) != string::npos )
flag=1;}
if (s[i]==' '){
if (flag==1)
k++;
flag=0;}}
cout<<"- :"<<k<<endl;
k=0;
q=0;
for(int i=0;i<len;i++){
if (s[i]!=' '){
q++;}
if (s[i]==' '){
if (q<=3)
k++;
q=0;}}
cout<<"- 3 :"<<k<<endl;
k=0;
flag=0;
for(int i=0;i<len;i++){
if (s[i]!=' ') {
if (s[i]=='-' )
flag=1;}
if (s[i]==' '){
if (flag==1)
k++;
flag=0;}}
cout<<"- :"<<k<<endl;
int mx=0;
string max_slovo="",slovo="";
k=0;
q=0;
for(int i=0;i<len;i++){
if (s[i]!=' ')  {
q++;
slovo+=s[i];}
if (s[i]==' '){
if (q>mx){
mx=q;
max_slovo=slovo;}
q=0;
slovo="";}}
cout<<" :"<<max_slovo<<endl;
cout<<" :"<<mx<<endl;
        }
return 0;
}
